import 'core-js/es6/promise'
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import iView from 'iview'

import App from './App'
import router from './router'
import store from './store'

import 'iview/dist/styles/iview.css'
import './styles/index.less'

Vue.config.productionTip = false

Vue.use(iView)

store.dispatch('preboot').then(() => {
  /* eslint-disable no-new */
  new Vue({
    el: '#app',
    router,
    store,
    template: '<App/>',
    components: { App }
  })
})

var script = document.createElement('script')
script.src = 'http://gosspublic.alicdn.com/aliyun-oss-sdk.min.js'
document.body.appendChild(script)
